![]() |
MakeIconCache |
||||
Header: | Icons.h | Carbon status: | Supported | |
Gets a handle to an empty icon cache.
OSErr MakeIconCache ( IconCacheRef *theCache, IconGetterUPP makeIcon, void *yourDataPtr );
On return, a pointer to a handle to the new, empty icon cache. The function allocates the necessary memory. You can add icon data to the new cache using the LoadIconCache function.
A universal procedure pointer to the icon getter callback function to associate with the icon cache. See the IconGetterProcPtr callback for more information on icon getter callback functions.
A pointer to the data to associate with the icon cache.
A result code.
All the Icon Utilities functions that accept a handle to an icon suite also accept a handle to an icon cache. An icon cache is like an icon suite except that it also contains a pointer to an icon getter callback function and a pointer to data that can be used as a reference constant. An icon cache typically does not contain handles to the icon resources for all icon family members. Instead, if the icon cache does not contain an entry for a specific type of icon in an icon family, the Icon Utilities functions call your application’s icon getter function to retrieve the data for that icon type.
This function may move or purge memory blocks in the application heap. For that reason, your application should not call it at interrupt time.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/18/2000)